<template>
  <svg class="svg-icon">
    <use :xlink:href="`#icon-${props.iconName}`" />
  </svg>
</template>

<script setup>
import { ElIcon } from 'element-plus'
const props = defineProps({
  iconName: {
    type: String,
    required: true
  }
})
</script>

<style lang="less" scoped>
.svg-icon {
  position: relative;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
  font-size: 18px;
  &::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    cursor: pointer;
    z-index: 1;
  }
}
</style>
